<template>
	<view class="mine">
		<view class="content">
			<view class="item" @tap="toPage('/pages/save/editpwd')" v-if="userinfo.buy_passwd">
				<view class="left">
					<!-- <image src="@/static/ico/site-ico-1.png" mode="aspectFill"></image> -->
					<view class="title">修改交易密码</view>
				</view>
				<u-icon name="arrow-right" color="#BBBBBB"></u-icon>
			</view>
			<view class="item" @tap="toPage('/pages/save/editpwd')" v-else>
				<view class="left">
					<!-- <image src="@/static/ico/site-ico-1.png" mode="aspectFill"></image> -->
					<view class="title">设置交易密码</view>
				</view>
				<u-icon name="arrow-right" color="#BBBBBB"></u-icon>
			</view>
			<view class="item" @tap="toPage('/pages/save/editloginpwd')">
				<view class="left">
					<!-- <image src="@/static/ico/site-ico-1.png" mode="aspectFill"></image> -->
					<view class="title">修改登录密码</view>
				</view>
				<u-icon name="arrow-right" color="#BBBBBB"></u-icon>
			</view>
			<!-- <view class="item" @tap="toPage('/pages/save/loginmanager')">
				<view class="left" >
					<image src="@/static/ico/site-ico-1.png" mode="aspectFill"></image>
					<view class="title">登录设备管理</view>
				</view>
				<u-icon name="arrow-right" color="#FFFFFF"></u-icon>
			</view> -->
		</view>

	</view>
</template>

<script>
	import {
		mixin
	} from '@/Mixins/mixin.js'
	export default {
		mixins: [mixin],
		data() {
			return {
				userinfo: ''
			}
		},
		onReady() {

		},
		onLoad() {
			this.getUser()
		},
		methods: {
			async getUser() {
				let data = await this.$http({
					url: this.$api.getUser,
					method: 'POST',
					hideLoading: true,
					needToken: true,
					data: {}
				})
				console.log('[用户信息]', data)
				if (data.code == 200) {
					this.userinfo = data.data
					// this.myGoodsList()
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.mine {
		// min-height: 100vh;
		padding: 30rpx;
		box-sizing: border-box;
		background-color: $nft-bg-color;

		.content {

			// background: #333333;
			// border-radius: 28rpx;
			// padding: 0 26rpx 0 34rpx;
			.item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 28rpx;
				font-weight: 400;
				color: #131415;
				padding: 34rpx 0 34rpx 0;
				border-bottom: 1px solid #F5F5F5;

				&:last-child {
					// border-bottom: 0;
				}

				.left {
					display: flex;
					align-items: center;

					image {
						width: 32rpx;
						height: 36rpx;
						margin-right: 44rpx;
					}
				}
			}
		}

	}
</style>
